<div id="attendance">
	<div class="link">
		<?php
		echo (date('Y-m-d', $moduleData['endoftheweek']) > '2009-10-17') ? "<a href=\"?datum=" . date('Y-m-d', strtotime('-1 week', $moduleData['endoftheweek'])) . "\">Vorige week</a>" : '';
		echo (date('Y-m-d', $moduleData['endoftheweek']) < date('Y-m-d')) ? "<a href=\"?datum=" . date('Y-m-d', strtotime('+1 week', $moduleData['endoftheweek'])) . "\">Volgende week</a>" : '';
		?>
	</div>
	<table>
	<?php
	echo $this->Html->tableHeaders(array(
		'Naam', 'Week '.(date('W', strtotime('-2 week', $moduleData['endoftheweek']))), 'Week '.(date('W', strtotime('-1 week', $moduleData['endoftheweek']))), 'Week '.(date('W', $moduleData['endoftheweek'])), '3 weken totaal', "2010-2011"
	));
	//debug($attendances);
	foreach($moduleData['attendances'] as $attendance)
	{
		echo $this->Html->tableCells(array(
			array(
				array($attendance['User']['username'], array('class' => 'name')),
				$attendance['Attendance']['weekthree'],
				$attendance['Attendance']['weektwo'],
				$attendance['Attendance']['weekone'],
				$attendance['Attendance']['weektotal'],
				$attendance['Attendance']['total']
			)
		),
		array('class' => 'yellow'));
	}
	?>
	</table>
</div>